﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RemoteObject
{
    public class DistributeRequestor
    {
        string remoteFile;
        string localFile;
        RemoteObject.MyRemoteObject robj;
        private long jobID;

        public DistributeRequestor(string fnRemote, string fnLocal)
        {
            remoteFile = fnRemote;
            localFile = fnLocal;
            robj = (RemoteObject.MyRemoteObject)Activator.GetObject(typeof(RemoteObject.MyRemoteObject), Common.CloudServerURL);
            jobID = robj.GetNewClientID();
        }

        public void Run()
        {
            robj.DistributeRequest(remoteFile, localFile, Common.LocalIPAddress, jobID);
        }
    }
}
